package com.poizon.infrastructure.center.config;


import com.poizon.infrastructure.center.config.core.event.listener.AbstractChangeListener;
import com.poizon.infrastructure.center.config.core.event.listener.ConfigChangeListenerImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

import javax.annotation.PostConstruct;

/**
 * 配置中心自动配置
 */
@Import(BannerPrint.class)
@Slf4j
public class ConfigCenterAutoConfig {
    @PostConstruct
    public void init() {
        log.info(">初始化配置中心核心包自动配置");
    }


    @Bean
    public AbstractChangeListener configChangeListener() {
        log.info(">初始化配置变更监听器处理器");
        return new ConfigChangeListenerImpl();
    }
}
